package cn.ztr.familyalbum.service.impl;

import cn.ztr.familyalbum.common.CommonResult;
import cn.ztr.familyalbum.dto.GrowthAlbumTemplateDto;
import cn.ztr.familyalbum.entity.GrowthAlbumTemplate;
import cn.ztr.familyalbum.mapper.GrowthAlbumTemplateMapper;
import cn.ztr.familyalbum.service.IGrowthAlbumTemplateService;
import cn.ztr.familyalbum.vo.TemplateDictionaryVo;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.beans.Transient;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2020-05-29
 */
@Service
public class GrowthAlbumTemplateServiceImpl extends ServiceImpl<GrowthAlbumTemplateMapper, GrowthAlbumTemplate> implements IGrowthAlbumTemplateService {

    @Autowired
    GrowthAlbumTemplateMapper growthAlbumTemplateMapper;
    @Override
    public List<TemplateDictionaryVo> queryTemplateList(GrowthAlbumTemplateDto template) {
        return growthAlbumTemplateMapper.queryTemplateList(template);
    }

    @Override
    public TemplateDictionaryVo auditTemplate(Integer id) {
        return growthAlbumTemplateMapper.auditTemplate(id);
    }

    @Override
    public int completeAudit(Integer id, Integer state) {
        return growthAlbumTemplateMapper.completeAudit(id,state);
    }

//    @Transactional
//    @Override
//    public Integer insertTemplate(GrowthAlbumTemplate template) {
//        return growthAlbumTemplateMapper.insert(template);
//    }
//    @Transactional
//    @Override
//    public Integer updateTemplate(GrowthAlbumTemplate template) {
//        return growthAlbumTemplateMapper.updateById(template);
//    }
}
